package com.shouhuyun.jobs;

import com.alibaba.dubbo.config.annotation.Reference;
import com.shouhuyun.service.OrderService;
import com.shouhuyun.service.OrderSettingService;
import org.springframework.beans.factory.annotation.Autowired;
import redis.clients.jedis.JedisPool;

/**
 * 自定义Job  实现定时清理垃圾预约信息
 */
public class ClearOrderJob {
    @Autowired
    private JedisPool jedisPool;
    @Reference
    private OrderSettingService orderSettingService;
    @Reference
    private OrderService orderService;

    public void clearOrder(){
        orderService.clearOrder();
        orderSettingService.clearOrder();
    }
}
